function setItem(key: string, data: any) {
  sessionStorage.setItem(key, data)
}

function getItem(key: string): object {
  return JSON.parse(sessionStorage.getItem(key) || '{}')
}

function removeItem(key: string) {
  sessionStorage.removeItem(key)
}

export { setItem, getItem, removeItem }